package cn.edu.abtu.controller;

import cn.edu.abtu.entity.StatisticsDaily;
import cn.edu.abtu.service.StatisticsDailyService;
import cn.edu.abtu.vo.ResponseData;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 网站统计日数据(StatisticsDaily)表控制层
 *
 * @author makejava
 * @since 2022-10-06 16:22:43
 */
@RestController
@CrossOrigin
@RequestMapping("/edustatistics/statisticsDaily")
public class StatisticsDailyController {

    @Resource
    private StatisticsDailyService statisticsDailyService;

    @PostMapping("/registerCount/{date}")
    public ResponseData registerCount(@PathVariable String date){
        return statisticsDailyService.registerCount(date);
    }

    @GetMapping("/showData/{type}/{begin}/{end}")
    public ResponseData showData(@PathVariable String type,
                                 @PathVariable String begin,
                                 @PathVariable String end){
        return statisticsDailyService.showData(type, begin, end);
    }


}

